package self.hoy.demo.cloud.seata.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import self.hoy.demo.cloud.seata.dao.TStorageDao;
import self.hoy.demo.cloud.seata.service.StorageService;

import javax.annotation.Resource;

/**
 * @author 三共小不
 * @date 2020/6/21
 */
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {

    @Resource
    private TStorageDao storageDao;


    @Override
    public void decrease(Long productId, Integer count) {
        log.info("----> storage-service中扣减库存开始");
        storageDao.decrease(productId,count);
        log.info("----> storage-service中扣减库存结束");
    }
}
